Multiway Blockwise In-place Merging
نویسندگان
چکیده
We present an algorithm for asymptotically efficient multiway blockwise in-place merging. Given an array A containing sorted subsequences A1, . . . , Ak of respective lengths n1, . . . , nk, where ∑k i=1 ni = n, we assume that extra k ·s elements (so called buffer elements) are positioned at the very end of array A, and that the lengths n1, . . . , nk are positive integer multiples of some parameter s (i.e., multiples of a given block of length s). The number of input sequences k is a fixed constant parameter, not dependent on the lengths of input sequences. Then our algorithm merges the subsequences A1, . . . , Ak into a single sorted sequence, performing Θ(log k·n) + O((n/s)) + O(s· log s) element comparisons and 3 ·n + O(s · log s) element moves. Then, for s = dn2/3/(log n)1/3e, this gives an algorithm performing Θ(log k ·n) + O((n·log n)) comparisons and 3·n + O((n·log n)) moves. That is, our algorithm runs in linear time, with an asymptotically optimal number of comparisons and with the number of moves independent on the number of input sequences. Moreover, our algorithm is “almost in-place”, it requires only k extra blocks
منابع مشابه
Branch merging for scheduling concurrent executions of branch operatio - Computers and Digital Techniques, IEE Proceedings-
Branches are a major limiting factor to instruction-level parallelism. One solution is to execute several branches simultaneously using multiway branching architectures. Such architectures are especially important when the instruction issue width becomes large. The authors study the problem of compile-time scheduling of branch operations on such architectures: an optimisation called branch merg...
متن کاملAAL5X ATM Adaptation Layer 5 eXtension for Efficient VC Merging over ATM Networks
The realization of multiway group communications and scaleable layer 3 switching over ATM networks requires merging of virtual connections to be possible. This capability, known as VC merging, cannot be provided by ATM networks which use a standard ATM protocol stack on both switches and stations. This paper describes AAL5X, an extension to the ATM Adaptation Layer 5 (AAL5) that allows for VC m...
متن کاملTradeoffs Between Branch Mispredictions and Comparisons for Sorting Algorithms
Branch mispredictions is an important factor affecting the running time in practice. In this paper we consider tradeoffs between the number of branch mispredictions and the number of comparisons for sorting algorithms in the comparison model. We prove that a sorting algorithm using O(dn log n) comparisons performs Ω(n log d n) branch mispredictions. We show that Multiway MergeSort achieves this...
متن کاملDesign of Efficient Regular Arrays for Matrix Multiplication by Two-Step Regularization
215 given k and n, one can choose any value of nz in the range from 2 to n to construct a multiway merging network. However, use of certain values of m results in less delay than others for the same value of n. One choice of the value of m is m = n. In this case, can achieve this time bound for the given value of n, are m = 2' with c < [log, n1. We have also assumed that there are n keys in eac...
متن کاملCharacterization of Galois closed sets using multiway dissimilarities
We place ourselves in a so-called meet-closed description context; that is a context consisting of a finite nonempty entity set E whose elements are described in a complete meet-semilattice D, by means of a descriptor δ. Then we consider multiway quasi-ultrametric dissimilarities on E, a class of multiway dissimilarities that, with their relative k-balls, extend the fundamental in classificatio...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008